Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified table integration - testing branch please ignore #3913

Closed
wants to merge 8 commits into from

Conversation

casey
Copy link
Collaborator

@casey casey commented Aug 25, 2024

No description provided.

partialord and others added 8 commits August 18, 2024 07:43
As far as I know, no one has ever used this, and it would take
extra work to support it with the new OUTPOINT_TO_UTXO_ENTRY
table (which greatly improves performance).  Just remove the
option for now.
This code is unused, now that we have the newer (and much nicer)
pointer-handling code on lines 190-194.
Replace the OUTPOINT_TO_TXOUT, OUTPOINT_TO_SAT_RANGES, and
SATPOINT_TO_SEQUENCE_NUMBER tables with a new OUTPOINT_TO_UTXO_ENTRY
table.  This saves space by avoiding redundant key storage, and
makes updates quicker since we can write all of an outpoint's
data at once.

It also simplifies caching.  We used to have utxo_cache for
OUTPOINT_TO_TXOUT and range_cache for OUTPOINT_TO_SAT_RANGES,
while SATPOINT_TO_SEQUENCE_NUMBER was uncached; now, there's
a single unified utxo_cache which covers all three.  Additionally,
since SCRIPT_PUBKEY_TO_OUTPOINT and SEQUENCE_NUMBER_TO_SATPOINT
are storing data which is already included in the cache (just
with the keys and values swapped), we get to cache those tables
too for free.

The combined effect is that an index with --index-sats and
--index-addresses is now about 54 GB smaller and twice as fast
to build.
With the unified OUTPOINT_TO_UTXO_ENTRY table, these stats aren't
useful; they're either identical to the stats in the regular
"Committing at block height ..." message (if you're using --index-sats),
or zero (if you're not).
@casey casey closed this Aug 27, 2024
@casey casey deleted the unified-table-integration branch August 27, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant